﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.UI.WebControls;
using NetDon.OA.Data.CollectionClasses;

namespace NetDon.OA.Interface.CRM
{
    public interface ICustomerInfoService
    {
        bool AddCustomerInfo(CustomerInfoData customerInfo);
        bool ModifyCustomerInfo(CustomerInfoData customerInfo);
        bool RemoveCustomerInfo(Guid customerId);
        CustomerInfoData GetCustomerInfo(Guid customerId);
        IEnumerable<CustomerInfoData> GetAllCustomerInfo();
        int GetCustomerInfoCount(CustomerInfoSearchCriteria criteria);

        IEnumerable<CustomerInfoData> SearchCustomerInfoDatasByCondition(CustomerInfoSearchCriteria criteria,
                                       string sortExpression, SortDirection sortDirection, int pageSize, int pageIndex);

        bool CheckCustomerCodeExist(Guid customerId, String customerCode, Guid areaId);
        bool CheckCustomerNameExist(Guid customerId, String customerName, Guid areaId);

        bool ValidateCustomerReferenced(Guid customerId);

        DictionaryCollection GetCustomerGoodsShippTypes(Guid customerId, Guid areaId);

        CustomerInfoData GetCustomerInfoByCode(string clientName);
    }
}
